<?php
	header('Content-type: image/png');

	$name = $_GET["name"];
	$guild = $_GET["guild"];
	$level = $_GET["level"];
	$class = $_GET["class"];
	$race = $_GET["race"];
	$realm = $_GET["realm"];
	$region = $_GET["region"];
	
	$font = "MORPHEUS";
	$font2 = "ARIAL";
	$background = "arthus";	
	$image = imagecreatefromjpeg("backgrounds/".$background.".jpg");
	$white = imagecolorallocate($image, 255, 255, 255);
	$shadowColor = imagecolorallocate($image, 0, 0, 0);
	
	imagettftext($image, 22, 0, 6, 28, $shadowColor, "fonts/".$font.".ttf", $name);
	imagettftext($image, 22, 0, 5, 27, $white, "fonts/".$font.".ttf", $name);
	
	imagettftext($image, 9, 0, 6, 43, $shadowColor, "fonts/".$font2.".ttf", "<".$guild.">");
	imagettftext($image, 9, 0, 5, 42, $white, "fonts/".$font2.".ttf", "<".$guild.">");
	
	imagettftext($image, 9, 0, 6, 55, $shadowColor, "fonts/".$font2.".ttf", $level." ".$race." ".$class);
	imagettftext($image, 9, 0, 5, 54, $white, "fonts/".$font2.".ttf", $level." ".$race." ".$class);
	
	imagettftext($image, 9, 0, 6, 67, $shadowColor, "fonts/".$font2.".ttf", $realm."-".$region);
	imagettftext($image, 9, 0, 5, 66, $white, "fonts/".$font2.".ttf", $realm."-".$region);
	
	imagepng( $image );
	imagedestroy( $image );
	
?>